package com.example.brisk.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.example.brisk.constant.BaseConstant;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * book实体类,运用lombok注解实现GET SET。
 */
@Getter
@Setter
public class Book implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private Double price;

    @DateTimeFormat(pattern = BaseConstant.ENTITY_PATTERN_DATETIME)
    @JsonFormat(pattern = BaseConstant.ENTITY_PATTERN_DATETIME)
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = BaseConstant.ENTITY_PATTERN_DATETIME)
    @JsonFormat(pattern = BaseConstant.ENTITY_PATTERN_DATETIME)
    private LocalDateTime updateTime;


}
